/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef CONTROL_VALUE_H
#define CONTROL_VALUE_H

#include "sub_thing_model.h"
#include "base_thing_model.h"

namespace OHOS {
namespace iotConnect {
class ControlValue: public AbstractDevice {
public:
    virtual int32_t DevInfoGetCharState(const IotcCharState inData, char **data, uint32_t *len) const override;
    virtual int32_t ConfigurationManagementGetCharState(const IotcCharState inData, char **data, uint32_t *len) override;
    virtual int32_t ConfigurationManagementPutCharState(const IotcCharState inData, const char *data, uint32_t len) override;
    
    virtual int32_t InternalHandler(const IotcCharState inData, char **out, uint32_t *len,
        ThingModelPutOrGet flag = ThingModelPutOrGet::GET) override;
    virtual int32_t GetAllInfoHandler(const std::string& devId, IotcCharState *state) override;
    // static int32_t ServiceListGetCharState (const IotcServiceInfo *svc, char **data, uint32_t *len) ;
    // static int32_t ServiceListPutCharState (const IotcServiceInfo *svc, const char *data, uint32_t *len) ;
public:
    ControlValueServiceList controlValueServiceList_;
};
}
}
#endif
